#pragma once

#include "global.h"
#include "HomeViewResourceDefine.h"
#include "AppDefine.h"
#include "EventLoopService.h"

#define lcd M5.Lcd

class ViewComponent
{
private:
	bool needClear = true;

protected:
	virtual void doRender() = 0;
	virtual void clearArea() 
	{
		// default do nothing
	};

public:
	void render();

public:
	ViewComponent(bool needClear)
		: needClear(needClear) {};

	~ViewComponent();
};

